﻿<%@ Page Language="C#" MasterPageFile="~/LMIS_Master.Master" AutoEventWireup="true" CodeBehind="BCO.aspx.cs" Inherits="LMIS_Application.BCO" Title="LIMS | BCO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent1" runat="server">
    <table>
        <tr>
            <td><h2>View Books Checked Out</h2></td>
        </tr>
        <tr><td>
            <asp:GridView ID="gvBCO" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Book ID,Book Copy ID" 
                DataSourceID="SqlDataSource" ForeColor="#333333" GridLines="None">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:BoundField DataField="Book ID" HeaderText="Book ID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="Book ID" />
                    <asp:BoundField DataField="Book Copy ID" HeaderText="Book Copy ID" 
                        InsertVisible="False" ReadOnly="True" SortExpression="Book Copy ID" />
                    <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                    <asp:BoundField DataField="Author" HeaderText="Author" 
                        SortExpression="Author" />
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LIMS_DB %>" 
                SelectCommand="SELECT Book.BookId AS 'Book ID', Inventory.InventoryId AS 'Book Copy ID', Book.Title, Book.AuthorName AS 'Author' FROM Book INNER JOIN Inventory ON Book.BookId = Inventory.BookId WHERE (Inventory.Status = 0)">
            </asp:SqlDataSource>
            </td></tr>
     </table>   
</asp:Content>
